package servlet;
/*
import URL.Constants;
import bean.HotVideo;
import service.HotVideoService;
import service.LhlService;
import service.LsjtService;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;

@WebServlet("/TestServlet")

public class TestServlet  extends HttpServlet {
/**
 * @author: dae
 * @email: 675116529@qq.com
 * @phone: 15270029507
 * @DateTime: 2021/12/13 13:44
 **/


/*
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    //设置字符
    request.setCharacterEncoding("utf-8");
    response.setCharacterEncoding("utf-8");

    //转换字符串
    String xz = request.getParameter("xz");

    //调用UserDao、UserDaoImpl类及方法
    //UserDao ud = new UserDaoImpl();

    //处理结果跳转相应页面
    switch (xz) {
        case "1":
           HotVideoService hotVideoService = new HotVideoService();
            hotVideoService.getHotVideo();
            HotVideo h =new HotVideo();
        HttpSession session = request.getSession();
        session.setAttribute("user",hotVideoService.getHotVideo());
            response.sendRedirect("HOtVideo.jsp");
        break;
        case "2":


            Date da =new Date();
            SimpleDateFormat formatter = new SimpleDateFormat("MM/dd ");
            Constants.da =formatter.format(da);

            LsjtService lsjtService = new LsjtService();
            HttpSession session1 = request.getSession();
            session1.setAttribute("ljst",lsjtService.getLsjt());
            response.sendRedirect("LSJT.jsp");
            break;
        case  "3":
            Date da1 =new Date();
            SimpleDateFormat formatter1 = new SimpleDateFormat("yyyy-MM-dd ");
            Constants.Lhl_data = formatter1.format(da1);

            LhlService l =new LhlService();
            HttpSession session2 = request.getSession();
            session2.setAttribute("lhl",l.getLhl());
            response.sendRedirect("LHL.jsp");

   break;
        default:
   break;

    }
}

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        doPost(request,response);
    }



}


 */